package iot.wlink.network.payload;


import com.alibaba.fastjson.JSONObject;
import iot.wlink.network.devices.enums.ProtocolsTypeEm;

/**
 * @author : willian fu
 * @date : 2021/8/20
 */
public interface Payload {

    /**
     * 默认序列化为json
     * @return 字节
     */
    default byte[] serialization(){
        return JSONObject.toJSONBytes(this);
    }

 /*   default Payload deserialization(byte[] payload){
        return JSONObject.parseObject(new String(payload), this.getClass());
    }*/
    String getUid();
}
